<script type="text/javascript">
$(function(){
	var isNew = "${(pc)!'false'}";
	if(isNew == "false"){
		var isC = "${(info.isCommodity)!'false'}";
		if(isC == "true"){
			var trs = $("tr[class='hid']"); 
			for(i = 0; i < trs.length; i++){ 
			    trs[i].style.display = ""; 
			} 
		}
	}
 	$('#tableInvCommodityInfo').find("input:checkbox, input:radio").not('input.ibtn').uniform();
});
</script>
<#import "/freemarker/modeltype.ftl" as mt>
<#import "/freemarker/modeltype_entity.ftl" as mte>
<form id="tableInvCommodityInfo">
<div><h4>信息编辑</h4></div>
<div>
	<table class="table table-striped" >
		<tbody>
			<tr>
				<td class="table-left" style="width:100px;">是否商品</td>
				<td style="width:350px;" colspan="3">
					<input type="radio" id="isCommodity" name="isCommodity" value="false" onclick="addEvent_InvCommodity_trHide();"  <#if pc??>checked="checked"<#else><#if info?? && info.isCommodity == false>checked="checked"<#else>checked="checked"</#if></#if> />否&nbsp;&nbsp;
					<input type="radio" id="isCommodity1" name="isCommodity" value="true" onclick="addEvent_InvCommodity_trShow();"  <#if pc??><#else><#if info?? && info.isCommodity == true>checked="checked"</#if></#if> />是
				</td>
			</tr>
			<tr>
				<td class="table-left" style="width:100px;">名称</td>
				<td style="width:350px;"><input class="form-control" onkeyup="addEvent_InvCommodity_TextKeyup();" type="text" id="name" name="name" <#if pc??><#else>value='${(info.name)!''}'</#if> style="width:300px;" />
					<input  type="hidden" id="code" name="code" <#if pc??><#else>value="${(info.code)!''}"</#if>  />
					<input  type="hidden" id="oc" name="oc" <#if pc??><#else>value="${(info.oc)!''}"</#if>/>
				</td>
				<td class="table-left" style="width:100px;">上级节点</td>
				<td>
					<div class="input-group" style="width:400px;">
						<input class="form-control" readonly="readonly" type="text"  id="pn" <#if pc??>value='${(info.name)!''}'<#else>value='${(info.pn)!''}'</#if>  style="width:300px;">
						<input class="form-control" type="hidden" name="pc" id="pc" <#if pc??>value='${(pc)!''}'<#else>value="${(info.pc)!'-1'}"</#if> />
					</div>
				</td>
			</tr>
			<tr class="hid" style="display: none">
				<td style="width:100px;" class="table-left">快记码</td>
				<td>
					<input class="form-control" type="text" id="fast" name="cItem.fast" value="${(info.cItem.fast)!''}" style="width:300px;" />
					<input type="hidden" name="cItem.code" <#if pc??><#else>value="${(info.cItem.code)!''}"</#if>/>
					<input type="hidden" name="cItem.oc" <#if pc??><#else>value="${(info.cItem.oc)!''}"</#if>/>
					<input type="hidden" id="cc" name="cItem.cc" <#if pc??><#else>value="${(info.cItem.cc)!''}"</#if>/>
					<input type="hidden"  name="cItem.deleted" <#if pc??><#else>value="${(info.cItem.deleted)!''}"</#if>/> 
				</td>
				<td style="width:100px;" class="table-left">计量单位</td>
				<td>
					<input id="un1" name="cItem.un" value="${(info.cItem.un)!''}"/>
					<input id="uc1" name="cItem.uc" value="${(info.cItem.uc)!''}" type="hidden"/>
				</td>
			</tr>
			<tr class="hid" style="display: none">
				<td class="table-left" style="width:100px;">成本价</td>
				<td><input class="form-control" type="text" id="price" name="cItem.price" <#if pc??><#else>value="${(info.cItem.price)!''}"</#if>  style="width:300px;" /></td>
				<td class="table-left" style="width:100px;">零售价</td>
				<td><input class="form-control" type="text" id="rp" name="cItem.rp" <#if pc??><#else>value="${(info.cItem.rp)!''}"</#if>  style="width:300px;" /></td>
			</tr>
			<tr class="hid" style="display: none">
				<td class="table-left" style="width:100px;">序列号类型</td>
				<td colspan="3">
					<input type="radio" id="snc" name="cItem.snc" value="1" <#if pc??>checked="checked"<#else><#if info?? && info.cItem?? && info.cItem.snc == 1>checked="checked"<#else>checked="checked"</#if></#if> />没有序列号&nbsp;&nbsp;
					<input type="radio" id="snc" name="cItem.snc" value="2" <#if pc??><#else><#if info?? && info.cItem?? && info.cItem.snc == 2>checked="checked"</#if></#if> />一类序列号&nbsp;&nbsp;
					<input type="radio" id="snc" name="cItem.snc" value="3" <#if pc??><#else><#if info?? && info.cItem?? && info.cItem.snc == 3>checked="checked"</#if></#if> />唯一序列号
				</td>
			</tr>
		<tr>
			<td colspan="4" style="text-align: center; height:30px;">
				<button class="btn btn-info" onclick="javascript:checked_InvCommodityInfo(); return false;"><i class="icon-save"></i> 保 存 </button>
				&nbsp;&nbsp;&nbsp;&nbsp;
				<button class="btn btn-primary" onclick="javascript:closeColorbox_InvCommdityInfo();return false;"><i class="icon-signout"></i> 取 消 </button>
			</td>
		</tr>
		</tbody>
	</table>
</div>
</form>
